.class public Lcom/instagram/android/c2dm/f;
.super Ljava/lang/Object;
.source "IgNotificationParser.java"


# direct methods
.method public static a(Lcom/instagram/android/service/f;Landroid/content/Intent;)Lcom/instagram/android/c2dm/d;
    .locals 2
    .parameter
    .parameter

    .prologue
    .line 36
    const-string v0, "data"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0}, Lcom/instagram/android/c2dm/f;->a(Lcom/instagram/android/service/f;Ljava/lang/String;)Lcom/instagram/android/c2dm/d;

    move-result-object v1

    .line 39
    const-string v0, "collapse_key"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 40
    if-eqz v0, :cond_0

    .line 41
    :goto_0
    invoke-virtual {v1, v0}, Lcom/instagram/android/c2dm/d;->f(Ljava/lang/String;)V

    .line 42
    return-object v1

    .line 40
    :cond_0
    sget-object v0, Lcom/instagram/android/c2dm/c;->l:Ljava/lang/String;

    goto :goto_0
.end method

.method public static a(Lcom/instagram/android/service/f;Ljava/lang/String;)Lcom/instagram/android/c2dm/d;
    .locals 4
    .parameter
    .parameter

    .prologue
    const/4 v1, 0x0

    .line 47
    :try_start_0
    new-instance v0, Lcom/instagram/android/c2dm/d;

    invoke-direct {v0}, Lcom/instagram/android/c2dm/d;-><init>()V

    .line 48
    invoke-virtual {p0, p1}, Lcom/instagram/android/service/f;->readTree(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v3

    .line 49
    const-string v2, "t"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_5

    const-string v2, "t"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    :goto_0
    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->h(Ljava/lang/String;)V

    .line 50
    const-string v2, "m"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->b(Ljava/lang/String;)V

    .line 51
    const-string v2, "tt"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_6

    const-string v2, "tt"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    :goto_1
    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->a(Ljava/lang/String;)V

    .line 53
    const-string v2, "ig"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->c(Ljava/lang/String;)V

    .line 59
    const-string v2, "igo"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 60
    const-string v2, "igo"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->c(Ljava/lang/String;)V

    .line 62
    :cond_0
    const-string v2, "i"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_7

    const-string v2, "i"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    :goto_2
    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->d(Ljava/lang/String;)V

    .line 63
    const-string v2, "a"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_8

    const-string v2, "a"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    :goto_3
    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->e(Ljava/lang/String;)V

    .line 65
    const-string v2, "collapse_key"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 66
    const-string v2, "collapse_key"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->f(Ljava/lang/String;)V

    .line 68
    :cond_1
    const-string v2, "sound"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 69
    const-string v2, "sound"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->i(Ljava/lang/String;)V

    .line 71
    :cond_2
    const-string v2, "pi"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_3

    .line 72
    const-string v2, "pi"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->textValue()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->j(Ljava/lang/String;)V

    .line 74
    :cond_3
    const-string v2, "u"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_4

    .line 75
    const-string v2, "u"

    invoke-virtual {v3, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/instagram/android/c2dm/d;->g(Ljava/lang/String;)V

    .line 81
    :cond_4
    :goto_4
    return-object v0

    .line 49
    :cond_5
    const-string v2, "Instagram"

    goto/16 :goto_0

    .line 51
    :cond_6
    invoke-virtual {v0}, Lcom/instagram/android/c2dm/d;->c()Ljava/lang/String;
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v2

    goto/16 :goto_1

    :cond_7
    move-object v2, v1

    .line 62
    goto :goto_2

    :cond_8
    move-object v2, v1

    .line 63
    goto :goto_3

    .line 79
    :catch_0
    move-exception v0

    .line 80
    const-string v2, "IgNotificationParser"

    const-string v3, "Exception occurred while trying to put up notification"

    invoke-static {v2, v3, v0}, Lcom/facebook/e/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    move-object v0, v1

    .line 81
    goto :goto_4
.end method
